from django.contrib import admin
from .models import Goods,AdminProfile,AdminLog

@admin.register(Goods)
class GoodsAdmin(admin.ModelAdmin):
    list_display = ['title', 'price', 'is_active', 'create_at']
    list_filter = ['is_active', 'create_at']
    search_fields = ['title', 'description']

@admin.register(AdminProfile)
class AdminProfileAdmin(admin.ModelAdmin):
    list_display = ['user', 'phone', 'email', 'department', 'create_at']
    list_filter = ['user', 'phone', 'email', 'department', 'create_at']
    search_fields = ['user', 'phone', 'email', 'department']
@admin.register(AdminLog)
class AdminLogAdmin(admin.ModelAdmin):
    list_display = ['admin', 'action', 'description', 'ip_address', 'create_at']
    list_filter = ['admin', 'action', 'description', 'ip_address', 'create_at']
    search_fields = ['admin', 'action', 'description', 'ip_address']

